package multithread.thread;

/**
 * Created by xi on 2019/1/15.
 */
public class Demo3 {
    public static void main(String[] args) {

		new Thread() {
			public void run() {
				System.out.println("thread0 start ..");
			};
		}.start();


		new Thread(new Runnable() {
			@Override
			public void run() {
				System.out.println("thread1 start ..");
			}
		}).start();


        //重写run的函数了，那么会覆盖run的方法 sub2
        new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println("runnable1");
            }
        }) {
            public void run() {
                System.out.println("sub2");
            };
        }.start();


    }
}
